package cn.tuling.user.service.impl;

import cn.tuling.User;
import cn.tuling.user.service.IUserService;
import org.springframework.stereotype.Service;

/**
 * Created on 2020/12/2.
 *
 * @author qiyang.
 * 描述：
 */
@Service
public class UserServiceImpl implements IUserService {

    public User get(Integer id) throws Exception {
        System.out.println("查询用户");
        if (id == null) {
            throw new Exception("id不能为null");
        }
        return new User();
    }

    public User add(User user) {
        System.out.println("添加用户");
        return new User();
    }

    public User update(User user) {
        System.out.println("修改用户");
        return new User();
    }

    public boolean delete(Integer id) {
        System.out.println("删除用户");
        return true;
    }
}
